<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>计算属性传参</title>
	</head>
	<body>
			<div id="app">
			<div>{{ count(5) }}</div>
		</div>
		<script src="../js/vue.js"></script>
		<script type="text/javascript">
			var vm = new Vue({
				el: '#app',
				data: {
					msg: 'hello world!',
					num: 10,
				},
				computed: {
					count() {
						return function(index) { //必须返回带有参数的函数
							return index + 1
						}
					}
				}
			});
		</script>

	</body>
</html>
